package com.qdxwx.data.service.advert;

import com.qdxwx.common.page.PageRequest;
import com.qdxwx.data.mapper.advert.AdvertTypeMapper;
import com.qdxwx.models.advert.AdvertType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
@Service
public class AdvertTypeServiceImpl implements AdvertTypeService {

	@Autowired
	private AdvertTypeMapper advertTypeMapper;

	@Override
	public List<AdvertType> getList(AdvertType websiteImagesType, PageRequest page)
	{
		return advertTypeMapper.selectList(websiteImagesType, page);
	}

	@Override
	public long count(AdvertType websiteImagesType) {
		return advertTypeMapper.selectCount(websiteImagesType);
	}

	@Override
	public int insert(AdvertType websiteImagesType)
	{
		return advertTypeMapper.insert(websiteImagesType);
	}

	@Override
	public int update(AdvertType websiteImagesType)
	{
		return advertTypeMapper.update(websiteImagesType);
	}

	@Override
	public int delete(int typeId)
	{
		return advertTypeMapper.deleteById(typeId);
	}

}
